/* Layout */
import Layout from "@/views/layout/Layout";
/*  -------------  WeSPR One ------------- */
const WeSPRTest = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One/WeSprTest")), "WeSPROne");
const WeSPRHistory = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One/WeSprHistory")), "WeSPROne");
const WeSPRDetail = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One/WeSprDetail")), "WeSPROne");

/*  -------------  WeSPR One(简易版) ------------- */
const WeSPREasyTest = (r) =>
require.ensure([], () => r(require("@/views/WeSPR-One-easy/WeSprTest")), "WeSPROneEasy");
const WeSPREasyHistory = (r) =>
require.ensure([], () => r(require("@/views/WeSPR-One-easy/WeSprHistory")), "WeSPROneEasy");
const WeSPREasyDetail = (r) =>
require.ensure([], () => r(require("@/views/WeSPR-One-easy/WeSprDetail")), "WeSPROneEasy");

/*  -------------  算法测试 ------------- */
const AlgorithmTestTest = (r) =>
  require.ensure([], () => r(require("@/views/algorithm-test/WeSprTest")), "algorithm");
const AlgorithmTestHistory = (r) =>
  require.ensure([], () => r(require("@/views/algorithm-test/WeSprHistory")), "algorithm");
const AlgorithmTestDetail = (r) =>
  require.ensure([], () => r(require("@/views/algorithm-test/WeSprDetail")), "algorithm");
/*  -------------  WeSPR One（扩散法） ------------- */
const WeSPRDiffuseTest = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-diffuse/WeSprTest")), "WeSPROneDiffuse");
const WeSPRDiffuseHistory = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-diffuse/WeSprHistory")), "WeSPROneDiffuse");
const WeSPRDiffuseDetail = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-diffuse/WeSprDetail")), "WeSPROneDiffuse");

/*  -------------  WeSPR One Auto ------------- */
const WeSPRTestAuto = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-auto/WeSprTest")), "WeSPROneAuto");
const WeSPRHistoryAuto = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-auto/WeSprHistory")), "WeSPROneAuto");
const WeSPRDetailAuto = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-auto/WeSprDetail")), "WeSPROneAuto");

/*  -------------  WeSPR One - test------------- */
const WeSPRTestDemo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-test/WeSprTest")), "WeSPROneTest");
const WeSPRHistoryDemo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-test/WeSprHistory")), "WeSPROneTest");
const WeSPRDetailDemo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-test/WeSprDetail")), "WeSPROneTest");

/*  -------------  WeSPR One - testTwo------------- */
const WeSPRTestDemoTwo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-testTwo/WeSprTest")), "WeSPROneTestTwo");
const WeSPRHistoryDemoTwo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-testTwo/WeSprHistory")), "WeSPROneTestTwo");
const WeSPRDetailDemoTwo = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-testTwo/WeSprDetail")), "WeSPROneTestTwo");
/*  -------------  WeSPR One 稳态 ------------- */
const WeSPRSteadyTest = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-steady/WeSprTest")), "WeSPROneSteady");
const WeSPRSteadyHistory = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-steady/WeSprHistory")), "WeSPROneSteady");
const WeSPRSteadyDetail = (r) =>
  require.ensure([], () => r(require("@/views/WeSPR-One-steady/WeSprDetail")), "WeSPROneSteady");

const routerList = [
  // WeSPR-One
  {
    path: "/WeSPR-One",
    component: Layout,
    sort: 11,
    name: "WeSPROne",
    meta: {
      title: "page.wespr",
      icon: "nested",
    },
    children: [
      {
        path: "/WeSPROneTest",
        component: WeSPRTest,
        name: "WeSPROneTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPROneHistory",
        component: WeSPRHistory,
        name: "WeSPROneHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetail",
        component: WeSPRDetail,
        name: "WeSPROneDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // WeSPR-One(简易版)
  {
    path: "/WeSPROneEasy",
    component: Layout,
    sort: 34,
    name: "WeSPROneEasy",
    meta: {
      title: "page.wespreasy",
      icon: "example",
    },
    children: [
      {
        path: "WeSPROneEasyTest",
        component: WeSPREasyTest,
        name: "WeSPROneEasyTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "WeSPROneEasyHistory",
        component: WeSPREasyHistory,
        name: "WeSPROneEasyHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneSimple",
        component: WeSPREasyDetail,
        name: "WeSPROneEasyDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
   // 算法测试
  {
    path: "/AlgorithmTest",
    component: Layout,
    sort: 33,
    name: "AlgorithmTest",
    meta: {
      title: "page.AlgorithmTest",
      icon: "logout",
    },
    children: [
      {
        path: "/AlgorithmTestTest",
        component: AlgorithmTestTest,
        name: "AlgorithmTestTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/AlgorithmTestHistory",
        component: AlgorithmTestHistory,
        name: "AlgorithmTestHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WePRPOneDemarcation",
        component: AlgorithmTestDetail,
        name: "AlgorithmTestDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // WeSPR-One（扩散法）
  {
    path: "/WeSPROne-Diffuse",
    component: Layout,
    sort: 32,
    name: "WeSPROneDiffuse",
    meta: {
      title: "page.wesprdiffuse",
      icon: "phone",
    },
    children: [
      {
        path: "/WeSPROneTestDiffuse",
        component: WeSPRDiffuseTest,
        name: "WeSPROneDiffuseTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPROneHistoryDiffuse",
        component: WeSPRDiffuseHistory,
        name: "WeSPROneDiffuseHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetailDiffuse",
        component: WeSPRDiffuseDetail,
        name: "WeSPROneDiffuseDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
   // WeSPR-One-Auto
  {
    path: "/WeSPR-OneAuto",
    component: Layout,
    sort: 30,
    name: "WeSPROneAuto",
    meta: {
      title: "page.wesprauto",
      icon: "qustion",
    },
    children: [
      {
        path: "/WeSPROneAuto",
        component: WeSPRTestAuto,
        name: "WeSPROneUploadAuto",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPROneHistoryAuto",
        component: WeSPRHistoryAuto,
        name: "WeSPROneHistoryAuto",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetailAuto",
        component: WeSPRDetailAuto,
        name: "WeSPROneDetailAuto",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // WeSPR-One-test
  {
    path: "/WeSPR-OneTest",
    component: Layout,
    sort: 29,
    name: "WeSPROneTestModule",
    meta: {
      title: "page.wesprtest",
      icon: "analyze",
    },
    children: [
      {
        path: "/WeSPROneTestPath",
        component: WeSPRTestDemo,
        name: "WeSPROneTestPath",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPROneHistoryPath",
        component: WeSPRHistoryDemo,
        name: "WeSPROneHistoryPath",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetailPath",
        component: WeSPRDetailDemo,
        name: "WeSPROneDetailPath",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // WeSPR-One-testTwo
  {
    path: "/WeSPR-OneTestTwo",
    component: Layout,
    sort: 29,
    name: "WeSPROneTestModuleTwo",
    meta: {
      title: "page.wesprtesttwo",
      icon: "customer",
    },
    children: [
      {
        path: "/WeSPROneTestPathTwo",
        component: WeSPRTestDemoTwo,
        name: "WeSPROneTestPathTwo",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPROneHistoryPathTwo",
        component: WeSPRHistoryDemoTwo,
        name: "WeSPROneHistoryPathTwo",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPROneDetailPathTwo",
        component: WeSPRDetailDemoTwo,
        name: "WeSPROneDetailPathTwo",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // WeSPR One(稳态法)
  {
    path: "/WeSPRSteady",
    component: Layout,
    sort: 23,
    name: "WeSPRSteady",
    meta: {
      title: "page.wesprState",
      icon: "message",
    },
    children: [
      {
        path: "/WeSPRSteadyTest",
        component: WeSPRSteadyTest,
        name: "WeSPRSteadyTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/WeSPRSteadyHistory",
        component: WeSPRSteadyHistory,
        name: "WeSPRSteadyHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/WeSPRSteadyDetail",
        component: WeSPRSteadyDetail,
        name: "WeSPRSteadyDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
]

export default routerList